module.exports = {
  presets: [
    [
      '@babel/preset-env',
      {
        targets: '> 0.25%, not dead',
        useBuiltIns: 'entry',
        corejs: 3,
      },
    ],
    '@babel/preset-react',
  ],
  plugins: [
    'react-hot-loader/babel',
    ['import', { libraryName: 'antd-mobile', style: 'css' }],
    [
      'import',
      {
        libraryName: '@umijs/hooks',
        libraryDirectory: 'lib',
        camel2DashComponentName: false,
      },
      '@umijs/hooks',
    ],
    [
      'import',
      {
        libraryName: 'lodash-es',
        libraryDirectory: '',
        camel2DashComponentName: false, // default: true
      },
      'lodash-es',
    ],
    '@babel/plugin-transform-runtime',
  ],
};
